VERSION := 0.1 alpha

_CFG_SELF_DIR := $(patsubst %/,%,$(dir $(lastword ${MAKEFILE_LIST})))

PREFIX  ?= /usr
DESTDIR ?= ${_CFG_SELF_DIR}/build

CFLAGS   += -std=c99 -pedantic -Wall -Wextra \
	    -Wshadow -Wfloat-equal -Wconversion -Wuninitialized

METALANG_CPP := -I$(abspath $(dir $(lastword ${MAKEFILE_LIST})))/include \
		-DML99_ALLOW_POOR_DIAGNOSTICS

CPPFLAGS += -D_XOPEN_SOURCE -DVERSION='"${VERSION}"' ${METALANG_CPP}

CLANG_TIDY   ?= clang-tidy
CLANG_FORMAT ?= clang-format
